#include<iostream>
using namespace std;

int a, b;
float x, y;
int main()
{
	int n;
	cin >> n;
	cin >> a >> b;
	x = b * 1.0 /a;
	for(int i = 0;i < n; i++)
	{
		cin >> a >> b;
		y = b *1.0 /a;
		if(y-x > 0.05)
			cout << "better" << endl;
		else if(x-y > 0.05)
			cout << "worse" << endl;
		else 
			cout << "same" <<endl;
	}
	return 0;
}
